{% include "../../header.html" %}
{% include "../../navigation.html" %}
<div class="wrapper">


    <div class="container-fluid">
        <!-- Page-Title -->
        <div class="row">
            <div class="col-sm-12">
                <div class="page-title-box">
                    <div class="btn-group pull-right">
                        <h4 class="page-title">Threads</h4>
                    </div>
                    <ol class="breadcrumb hide-phone p-0 m-0">
                        <li class="breadcrumb-item"><a href="/">HuntCMS</a></li>
                        <li class="breadcrumb-item"><a href="/forum/list">Forum</a></li>
                        <li class="breadcrumb-item active">Threads</li>
                    </ol>
                </div>
            </div>
        </div>
        <!-- end page title end breadcrumb -->
            <div class="row">
                    <div class="col-md-12 text-xs-center">
                            <form class="form-horizontal" role="form" action="" method="get">
                                
                                <div class="form-group float-left m-r-5">
                                    <input id="demo-foo-search" name="s" type="text" placeholder="Search Subject"
                                           class="form-control" autocomplete="on">
                                </div>
                                <div class="form-group float-left m-r-5">
                                        <input id="demo-foo-search" name="n" type="text" placeholder="Search Nickname"
                                               class="form-control" autocomplete="on">
                                    </div>
                                <div class="form-group float-left m-r-5">
                                    <button type="submit"
                                            class="btn btn-icon waves-effect waves-light btn-success m-b-5"><i
                                            class="fa fa-search"></i></button>
                                </div>
                                <div class="form-group float-left m-r-5">
                                    <a href="{{ url('forum.postaudit.list' , '')}}"
                                       class="btn btn-icon waves-effect waves-light btn-success m-b-5"><i
                                            class="fa fa-refresh"></i></a>
                                </div>
                            </form>

                        </div>
                <div class="col-sm-12">
                    <table class="table table-striped add-edit-table" id="datatable-editable">
                        <thead>
                        <tr>
                            <th data-toggle="true">Id</th>
                            <th data-toggle="true">Subject</th>
                            <th data-toggle="true">Keyword</th>
                            <th data-hide="phone">Poster</th>
                            <th data-hide="phone, tablet">Created time</th>
                            <th data-hide="phone, tablet">Deleted time</th>
                            <th data-hide="phone, tablet">Status</th>
                            <th data-hide="phone, tablet">Audit time</th>
                            <th data-hide="phone, tablet">Action</th>
                        </tr>
                        </thead>


                        <tbody>
                        {% for post in posts %}
                        <tr>
                            <td>{{ post.id }}</td>
                            <td>{% if post.thread.title %}{{ post.thread.title }}{% endif %}</td>
                            <td>{% if post.thread.title %}{{ post.thread.keywords }}{% endif %}</td>
                            <td>{% if post.user %}{{ post.user.nickname }}{% endif %}</td>
                            <td>{% if post.created %}{{ date('Y-m-d H:i:s', post.created) }}{% endif %}</td>
                            <td>{% if post.deleted %}{{ date('Y-m-d H:i:s', post.deleted) }}{% endif %}</td>
                            <td>{% if post.status == 1 %}Open{% else %}Close{% endif %}</td>
                            <td>{% if post.audited > 0 %}{{ date('Y-m-d H:i:s', post.audited) }}{% else %}Not verified{% endif %}</td>
                            <td class="actions">
                                <a href="{{ url('forum.postaudit.audit', '')}}?id={{ post.id }}" class="on-default edit-row" data-toggle="tooltip" data-placement="top" title="" data-original-title="Click Edit"><i class="fa fa-pencil"></i></a>
                                <a href="{{ url('forum.postaudit.del', '')}}?id={{ post.id }}" class="on-default remove-row" data-toggle="tooltip" data-placement="top" title="" data-original-title="Click Delete"><i class="fa fa-trash-o"></i></a>
                            </td>
                            
                        </tr>
                        {% endfor %}
                        </tbody>
                        <tfoot>
                        <tr class="active">
                            <td colspan="10">
                                <div class="text-right">
                                   
                                </div>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>

        <div class="clearfix">
            {% include "../../paginate.html" %}
        </div>

        <!-- end row -->
    </div> <!-- end container -->

</div>
<!-- end wrapper -->

{% include "../../footer.html" %}
